virtual image too big

Discussions related to using VirtualBox on Linux hosts.
cougyr
Posts: 13
Joined: 3. Aug 2009, 20:54
Primary OS: Debian other
VBox Version: OSE Debian
Guest OSses: linux live-CDs

virtual image too big

Post by cougyr »

When I hard boot any live_CD it will fill my screen fairly closely. There may be a little side shift, but the size is always close. When I boot the same live-CDs in VirtualBox, the image is way too large and I have to scroll in both directions to see it. How do I make VirtualBox capture the image properly?

Yes I have seen a lot of complicated instructions about installing the guest additions but, if I understand correctly, they are to be installed to the live-CD (guest) image which I have no intention of doing. I am not saving these images to my harddrive as that is pointless. I need VirtualBox to behave like a hard boot. So, how do I do this?
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: virtual image too big

Post by Perryg »

Sorry, you don't unless you install it to the hard drive and then install the guest additions.
The only other way is to set the host to the resolution of the image that you are using, probably 800x600.
cougyr
Posts: 13
Joined: 3. Aug 2009, 20:54
Primary OS: Debian other
VBox Version: OSE Debian
Guest OSses: linux live-CDs

Re: virtual image too big

Post by cougyr »

Perryg wrote:Sorry, you don't unless you install it to the hard drive and then install the guest additions.
The only other way is to set the host to the resolution of the image that you are using, probably 800x600.
No offence meant, but this is where I am having a great deal of trouble with the instructions. When you say, "install it to the hard drive" which "it" are you referring to? How do I "set the host to the resolution of the image that are using"? By "host" do you mean some setting in VirtualBox? You can't mean my main installation.

The puzzle to me is that a hard boot produces the correct result but a virtual boot does not.

Maybe I should explain. I have been re-mastering a number of live-CDs. I can't install anything to them (such as guest additions) that don't belong in the end result. I was using qemu but it is too slow. VirtualBox is much faster, and highly usable, but it does not capture the image properly. Is there any way to install the guest additions to VirtualBox without messing with the live images?
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Re: virtual image too big

Post by Sasquatch »

Please read the VirtualBox FAQ to know more about virtual machines, if you don't already know. After that, read the User Manual to know more about VirtualBox itself. The "it" Perry is talking about is the live cd you're running. You can install them to a hard drive. If you create a hard drive image for the VM and attach it to it, you can install the OS on it and then install the Guest Additions to get what you want, an environment that keeps it's settings and changes after you reboot or shut down.

If you are interested in only running a live environment, but the resolution is too big, why don't you just change that one? I'm sure you can change the resolution to a lower one. Let's say you have a monitor that has a maximum resolution of 1024 x 768, and the VM boots with that or higher, you have to change it to 800 x 600 in order to avoid scrolling. You can also change the resolution of your own system to a higher one (e.g. you run on 1024 x 768, but your monitor can handle 1280 x 1024).
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: virtual image too big

Post by Perryg »

You need to look at the latest Mandriva. They include a VBox-client in their install, and if it senses VBox it loads it up. I though that was too cool! Maybe you could incorporate something like that into your builds.
cougyr
Posts: 13
Joined: 3. Aug 2009, 20:54
Primary OS: Debian other
VBox Version: OSE Debian
Guest OSses: linux live-CDs

Re: virtual image too big

Post by cougyr »

Sasquatch wrote:Please read the VirtualBox FAQ to know more about virtual machines, if you don't already know. After that, read the User Manual to know more about VirtualBox itself.
I have but find both confusing on this issue. If they answered my questions clearly, then I would not have needed to post them. Sorry about that.
Sasquatch wrote:The "it" Perry is talking about is the live cd you're running. You can install them to a hard drive.
As I said, I am not going to be installing them.
Sasquatch wrote:If you are interested in only running a live environment, but the resolution is too big, why don't you just change that one?
That's what I want to do. Just where in VirtualBox do I do that? I see no need to change either my installed OS or any of the live-CDs which work just fine as they are. It is the VirtualBox image which is not working properly so how do I change that and only that?

Thanks for any suggestions.
vbox4me2
Volunteer
Posts: 5218
Joined: 21. Nov 2008, 20:27
Location: Rotterdam
Contact:

Re: virtual image too big

Post by vbox4me2 »

In order to resize the screen to proper resolutions you NEED to get the GA installed in the liveCD image, there is no other way around that.
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Re: virtual image too big

Post by Sasquatch »

Actually there is. As the TS stated, the initial resolution is too big. It's the same as when you boot the latest Fedora live CD, which will use a resolution of 1024 x 768 or 1280 x 1024, but you actually want to use 800 x 600. Changing that is the same as on a normal system, open the display properties of the OS and change the resolution there. You can't change the resolution from within VB, as you can't do that with your normal PC either. At least I haven't found a resolution button on my monitor to change it from 1280 x 1024 to 1600 x 1200. Can you tell me where to find such a button? :P
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: virtual image too big

Post by Perryg »

I think what the OP is really wanting (And I could be wrong) is a way to start any and all live cd's in a fixed resolution. I previously thought this was not achievable but in testing I think I have figured out how to do it.

First you create a VM to use. (Generic so call it Live CD)
Set the CD/DVD to the CD/DVD or if you are using an image then select the image, but you would need to change that for each different image you used. (so CD/DVD is preferred)
then using the VBoxManage you can set the video resolution that you want to use:

VBoxManage setextradata "Live CD" "CustomVideoMode1" "1400x1050x24" (This can be set to the exact resolution you need)
When you then start the live cd from within the VM that you created it does after the boot up switch to the mode I set it to use. (No GA installed)
I tested this on a Debian 5 Live cd and before I used the setextradata it booted in 800x600.
After I ran the setextradata, it booted in 1500x1050.
Go figure!

This probably needs more testing (if anyone is interested) But it does work on my system.
cougyr
Posts: 13
Joined: 3. Aug 2009, 20:54
Primary OS: Debian other
VBox Version: OSE Debian
Guest OSses: linux live-CDs

Re: virtual image too big

Post by cougyr »

Thank you, Perryg. You are on the right track. So far it's not working but it should. I don't need to use that command as root, do I? It looks like it enters it into ~/.VirtualBox/Machines/live-cd. After reading your post, I did some searching and found Mark Knowles' Workbench He adds this comment,
Once you have run the above command, you can start your virtual machine and change the resolution to the one you set above.
How? What am I missing here?
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: virtual image too big

Post by Perryg »

As I said this probably needs more testing. I tested this on a Windows host but I don't see why it should not work on a Linux box.
I do know it works for me and will test it some more. I did not do this as su or admin, but on a Linux box the case matters. I hope to work on the Linux side of this tomorrow, when I have more time (Been really busy today :) ).
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Re: virtual image too big

Post by Sasquatch »

When running the VBoxManage command on Linux, you have to run it as the user who has the VM, else it will spit out an error of "VM not found". Makes sense, because root doesn't have the same machines registered as you do.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
cougyr
Posts: 13
Joined: 3. Aug 2009, 20:54
Primary OS: Debian other
VBox Version: OSE Debian
Guest OSses: linux live-CDs

Re: virtual image too big

Post by cougyr »

$ VBoxManage setextradata live-cd CustomVideoMode1 1024x768x1 does put
<ExtraDataItem name="CustomVideoMode1" value="1024x768x16"/> into
~/.VirtualBox/Machines/live-cd/live-cd.xml as it should. Unfortunately, it doesn't help. I have tried three different live-CDs with no change at all. I understand that I should be adding vga = 0x200 | 0x117 + 0x30
vga = 839 to this somehow. I read somewhere that there is a grub.iso that can be added to VirtualBox but I have no idea where.

Live-CDs don't use xorg.conf. The whole point of these things is that anyone should be able to boot them in any machine and load up what the designer chose without having to make any configuration changes. I like them because I can boot them into a variety of machines and get the same result. The exception seems to be VirtualBox. I'm sure there is a workaround. All I need to do is find the right trigger.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: virtual image too big

Post by Perryg »

Sure it does. If you are having problem just enter it in manually. Here is a copy of mine:

Code: Select all

<ExtraData>
			<ExtraDataItem name="GUI/SaveMountedAtRuntime" value="yes"/>
			<ExtraDataItem name="GUI/ShowMiniToolBar" value="no"/>
			<ExtraDataItem name="GUI/LastWindowPostion" value="402,67,720,443"/>
			<ExtraDataItem name="GUI/Fullscreen" value="off"/>
			<ExtraDataItem name="GUI/Seamless" value="off"/>
			<ExtraDataItem name="GUI/AutoresizeGuest" value="on"/>
			<ExtraDataItem name="GUI/MiniToolBarAutoHide" value="on"/>
			<ExtraDataItem name="GUI/LastCloseAction" value="powerOff"/>
			<ExtraDataItem name="CustomVideoMode1" value="1400x1050x24"/>
I can send you the complete xml but this is al you really need.
cougyr
Posts: 13
Joined: 3. Aug 2009, 20:54
Primary OS: Debian other
VBox Version: OSE Debian
Guest OSses: linux live-CDs

Re: virtual image too big

Post by cougyr »

Perryg, maybe I mis-stated. My <ExtraData> went into the correct place, like yours. It is the live-CDs that don't read it. I have yet to find that these live-CDs read that file at all.
Post Reply