Page 1 of 2
virtual image too big
Posted: 3. Aug 2009, 21:06
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?
Re: virtual image too big
Posted: 3. Aug 2009, 21:08
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.
Re: virtual image too big
Posted: 3. Aug 2009, 22:13
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?
Re: virtual image too big
Posted: 3. Aug 2009, 22:20
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).
Re: virtual image too big
Posted: 3. Aug 2009, 22:39
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.
Re: virtual image too big
Posted: 3. Aug 2009, 22:59
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.
Re: virtual image too big
Posted: 3. Aug 2009, 23:09
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.
Re: virtual image too big
Posted: 3. Aug 2009, 23:40
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?

Re: virtual image too big
Posted: 4. Aug 2009, 20:06
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.
Re: virtual image too big
Posted: 5. Aug 2009, 01:27
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?
Re: virtual image too big
Posted: 5. Aug 2009, 04:24
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

).
Re: virtual image too big
Posted: 5. Aug 2009, 20:07
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.
Re: virtual image too big
Posted: 6. Aug 2009, 01:59
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.
Re: virtual image too big
Posted: 6. Aug 2009, 02:14
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.
Re: virtual image too big
Posted: 6. Aug 2009, 17:44
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.